<template>
    <div>
        <div class="result latest-music">
            <ol>
                <li v-for="value in sdata.artistInfo" :key="value.id" >
                    <div class="head-img"><img :src="value.img1v1Url" alt=""></div>
                    <div class="info"><p>{{value.name}}</p></div>
                </li>
                <li  v-for="value in sdata.albumInfo" :key="value.id">
                    <div class="head-img">
                        <img :src="value.picUrl" alt="">
                    </div>
                    <div class="info">
                        <p>{{value.name}}</p>
                    </div>
                </li>
            </ol>
            <ul>
                <li v-for="value in sdata.songList" :key="value.id" @click="selectItem(value.id)">
                    <div class="play-icon"></div>

                    <div class="songItem">
                        <!-- 歌手图片 -->


                        <!-- 歌曲信息 -->
                        <div class="songInfo">

                            <div class="songTitle">
                                <p>{{value.name}}</p>
                            </div>

                            <div class="singer">
                                <p>{{value.artists[0].name}}-{{value.album.name}}</p>
                            </div>

                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</template>

<script>
    export default {
        props:['sdata'],
        created(){

        },
      data(){
          return{}
      }

    }
</script>

<style scoped>
    .result{
    width: 100%;
    padding: 5px;
    }
    .result>ol>li{
        height: 66px;
       border-bottom: 1px solid rgb(219,219,219);
        padding: 10px 15px 5px 15px;
    }
    .head-img{
        width: 50px;
        height: 50px;
        display: inline-block;
        vertical-align: middle;
    }
    .head-img img{
        width: 100%;
        height: 100%;
        display: inline-block;
    }
    .info{
        width: 200px;
        margin-left:30px ;

    }
    .result>ol>li>img{
        width: 40px;
        height: 40px;
    }
    .info{
        flex: 1;display: inline-block;
    }
    .info>p{
        width: 90%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
    }



    .latest-music>ul>li{
        border-bottom: 1px solid rgb(226, 226, 226);
        padding:5px 10px;
        position: relative;
    }
    .songTitle{
        display: flex;
        font-size: 15px;
        margin-bottom: 5px;
        width: 90%;
    }
    .songTitle>p{

        color: #333;
    }
    .songTitle>span{
        flex: 1;
        color: gray;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .singer{
        font-size: 13px;
        color: gray;
    }

    .play-icon{
        width: 22px;
        height: 22px;
        background: url(../../assets/img/index_icon_2x.png);
        background-size: 166px 97px;
        background-position: -24px 0;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
    .songImg{
        width: 40px;
        height:40px;
        border-radius: 50%;
        overflow: hidden;
        margin-right: 10px;
        display: inline-block;
        vertical-align: middle;
    }

    .songImg>img{
        width:100%
    }
    .songInfo{
        display: inline-block;
        vertical-align: middle;
        width: 75%;
    }

</style>